.u-text {
    &-left {
        text-align: left;
    }
    &-center {
        text-align: center;
    }
    &-right {
        text-align: right;
    }
}

.u-flex-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    min-width: 0;
}
.flex-row-between {
    justify-content: space-between;
}

.clearfix {
    &:before,
    &:after {
        content: "";
        display: block;
        visibility: hidden;
        clear: both;
    }
}

/* --------- flex style START --------- */
.l-flex {
    @include flex;
}

.l-flex--v {
    @include flex-v;
}

.l-flex-wrap {
    @include flex-wrap;
}

.l-flex-nowrap {
    @include flex-nowrap;
}

.l-flex-shrink {
    @include flex-shrink;
}

.l-col-center {
    @include flex-col-c;
}

.l-col-top {
    @include flex-col-t;
}

.l-col-bottom {
    @include flex-col-b;
}

.l-row-left {
    @include flex-row-l;
}

.l-row-center {
    @include flex-row-c;
}

.l-row-right {
    @include flex-row-r;
}

.l-row-between {
    @include flex-row-between;
}

.l-row-around {
    @include flex-row-round;
}

@for $i from 1 to 12 {
    .l-flex-#{$i} {
        -webkit-box-flex: $i;
        -ms-flex: $i;
        flex: $i;
    }
}

.l-self-start {
    @include flex-self-t;
}
.l-self-center {
    @include flex-self-c;
}
.l-self-end {
    @include flex-self-b;
}
/* --------- flex style END --------- */


/* --------- x-form 表单 START --------- */
.x-form {
    padding: 12px 0 0;

    /* --- left + right padding --- */
    &.s-pd {
        padding-left: 24px;
        padding-right: 24px;

        &-xs {
            padding-right: 30px;
        }
        &-sm {
            padding-right: 50px;
        }
        &-md {
            padding-right: 80px;
        }
        &-lg {
            padding-right: 110px;
        }
    }


    /* --- label 样式 --- */
    .form__label--wrap .el-form-item__label {
        line-height: 1.4;
    }

    .x-form__wrap--full {
        width: 100%;
    }
    .x-form__item {
        &.no-margin-b {
            margin-bottom: 0;
        }
    }
    .x-form__item--half {
        width: 50%;
    }
    .x-form__label {
        margin: 2px 22px 2px 0;
    }
    .x-form__btn {
        min-width: 100px;
        margin: 0 6px 2px 0;
    }
    .x-form__btn--full {
        width: 100%;
        margin: 0 0 6px;
    }

    .x-form__subitem .el-form-item__content {
        width: 100%
    }
    .x-form__error--center .el-form-item__error {
        width: 100%;
        text-align: center;
    }
}


/* --- flex 布局 --- */
.x-form--flex {
    @include flex;
    @include flex-wrap;
    @include flex-col-t;

    & > .el-form-item {
        @include flex-1;
        min-width: 48%;
        max-width: 50%;
    }

    .x-form__item--full {
        @include flex-1;
        -webkit-flex: 1;
        -moz-flex: 1;
        flex: 1;
        width: 100%;
        min-width: 98%;
        max-width: none;
    }
}


/* --- 输入框等组件  --- */
.o-inp--full,
.o-btn--full,
.o-select--full,
.o-textarea--full .el-textarea__inner {
    width: 100%;
}
.o-inp-number--full {
    width: 100% !important;
    .el-input__inner {
        text-align: left;
    }
}

.o-inp-datetime--full {
    width: 100% !important;
}

.o-datetime-picker {
    .el-time-panel__content {
        &::before,
        &::after {
            top: 55%;
        }

    }
}
/* --------- x-form 表单 END --------- */

/* --------- x-dialog START --------- */
.x-dialog.el-dialog__wrapper {
    // 是否展示头部
    &.is-header .el-dialog .el-dialog__header {
        display: none;
    }

    // 无标题
    &.no-headtitle .el-dialog .el-dialog__header {
        height: 40px;
        padding: 0 24px;
        line-height: 40px;
        border: none;

        .el-dialog__headerbtn {
            top: 8px;
        }
    }

    .el-dialog {
        max-width: none;

        .el-dialog__header {
            height: 50px;
            padding: 14px 16px;
            border: 1px solid $--border-color;
            border-radius: 4px 4px 0 0;
            overflow: hidden;

            .el-dialog__title {
                display: block;
                padding-right: 16px;
                color: $--cont-color;
                font-size: 15px;
                font-weight: 700;
                line-height: 24px;
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
            }

            .el-dialog__headerbtn {
                top: 15px;
                line-height: 24px;
            }
        }

        .el-dialog__body {
            max-height: 600px;
            overflow: auto;
            padding: 16px;

            .x-form {
                padding-top: 0;
            }
        }

        .el-dialog__footer {
            padding: 0;
            border-top: 1px solid $--border-color;
        }


    }

    .x-dialog__body {
        margin-bottom: 5px;
        color: $--cont-color;
    }

    .x-dialog__footer {
        padding: 12px 18px;

        .o-btn {
            min-width: 80px;
            margin-left: 8px;
            letter-spacing: 1px;

            &.el-button--text {
                color: $--main-color;

                &:hover {
                    color: $--type-primary;
                    border: 1px dashed $--type-primary;
                    border-radius: 4px;
                }
            }
        }
    }

    &.s-md .el-dialog {
        width: 50%;
    }
    &.s-lg .el-dialog {
        width: 80%;
    }
}
/* --------- x-dialog END --------- */